<?php $this->load->view('admin/common/pageHead'); ?>
<?php $this->load->view('admin/common/pageHeader'); ?>

<div class="fLeft">
	<?php $this->load->view('admin/common/left_nav'); ?>
</div>

<div class="fRight" style="margin: 20px 0px 0px 0px">

	<table width="700px valign=" top" cellpadding="0" cellspacing="0"
		class="allbdr" border="0">
		<?php if (isset($msg)) { ?>
		<tr bgcolor="#3b63dd">
			<td colspan="10" align="center" class="fotter-color"
				style="color: red;"><b><?php echo $msg; ?> </b></td>
		</tr>
		<? } ?>
		<tr bgcolor="#3b63dd">
			<td colspan="10" align="center" class="fotter-color"><b>&nbsp;</b></td>
		</tr>
		<tr bgcolor="#3b63dd">
			<td colspan="10" align="center" class="fotter-color"><b>Manage Event
					Of ArtDex</b></td>
		</tr>
		<tr bgcolor="#3b63dd">
			<td colspan="10" align="center" class="fotter-color"><b>&nbsp;</b></td>
		</tr>
		<tr bgcolor="#3b63dd">
			<th align="center" class="fotter-color">Sr. No</th>
			<th align="left" class="fotter-color">Event Name</th>
			<th align="left" class="fotter-color">Event Address</th>
			<th align="center" class="fotter-color">Event Start Date</th>
			<!--<th align="left" class="fotter-color">Event End Date</th>
            <th align="left" class="fotter-color">Event Start Time</th>
            <th align="left" class="fotter-color">Event End Time</th>-->
			<th align="left" class="fotter-color">Status</th>
			<th colspan="2" align="center" class="fotter-color">Action</th>
		</tr>
		<tr bgcolor="#3b63dd">
			<td colspan="10" align="center" class="fotter-color"><b>&nbsp;</b></td>
		</tr>

		<?php foreach ($allEvent as $temp => $event) { ?>
		<tr>
			<td align="center"><?php echo $temp + 1; ?></td>
			<td align="left"><?php echo $event['event_name']; ?></td>
			<td align="left"><?php echo $event['event_address']; ?></td>
			<td align="center"><?php echo $event['event_start_date']; ?></td>
			<!--<td><?php echo $event['event_end_date']; ?></td>
                <td><?php echo $event['event_start_time']; ?></td>
                <td><?php echo $event['event_end_time']; ?></td>-->
			<td align="center"><?php echo $event['event_status']; ?></td>

			<td align="center" bgcolor=""><a
				href="/editEvent/<?php echo $event['event_id']; ?>"
				style="text-decoration: none;"> <img src="/public/images/edit.png"
					name="edit" border="0" value="Edit">
			</a>
			</td>
			<td align="center"><a href="javascript:void(0);"
				onClick="del(<?php echo $event['event_id']; ?>)" Title="Delete User"
				style="text-decoration: none;"> <img src="/public/images/delete.png"
					width="16" height="16" border="0">
			</a>
			</td>
		</tr>
		<?php } ?>
		<tr bgcolor="#3b63dd">
			<td colspan="10" align="center" class="fotter-color"><a
				href="/addNewEvent" style="text-decoration: none;"><input
					name="insert" class="form_input" id="update" value="Add An Event"
					type="submit"> </a>
			</td>
		</tr>

	</table>

</div>

<div class="clr"></div>
</br>
<script language="javascript">
                        function del(id)
                        {
                            if (confirm("Do you want to Delete This Event"))
                            {
                                document.location = "/deleteEvent/" + id;
                            } else {
                                document.location = "/manageEvent";
                            }
                        }
</script>


<?php $this->load->view('admin/common/pageFooter'); ?>